/**
 * @description 生成问卷列表
 * @author superrui
 */

const Mock = require("mockjs");
const Random = Mock.Random;

function getQuestionList({len=10, isStar=false,isDeleted=false}) {
  const list = [];
  for (let i = 0; i < len; i++) {
    list.push({
      _id: Random.id(),
      title: Random.ctitle(10,20),
      isPublished: Random.boolean(),
      isStar,
      answerCount: Random.natural(50, 100),
      createdAt: Random.datetime(),
      isDeleted, //假删除
    });
  }
  return list;
}
module.exports = getQuestionList;
